package org.finesys.common.disruptor.event.factory;

import org.finesys.common.disruptor.event.handler.LoggerThreadFactoryHandler;

import java.util.concurrent.ThreadFactory;

public class DisruptorEventLoggerThreadFactory implements ThreadFactory {
    @Override
    public Thread newThread(Runnable r) {
        Thread thread = new Thread(r);
        thread.setUncaughtExceptionHandler(new LoggerThreadFactoryHandler());

        return thread;
    }
}
